package com.bauer.base.proxy.cglib;


import org.springframework.cglib.core.DebuggingClassWriter;

public class Cglibmain {

    public static void main(String[] args) {

        //输出动态生成的类
        System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, "D:\\mine\\java\\base\\target\\cglib");
        CarInterceptor proxy = new CarInterceptor();
        //通过生成子类的方式创建代理类
        Car proxyImp = (Car) proxy.getProxy(Car.class);
        proxyImp.driveInner();
    }
}
